package homework05;

import java.util.ArrayList;
import java.util.LinkedHashMap;

import java.util.Map;
import java.util.Set;

public class Test {
    public static void main(String[] args) {
        LinkedHashMap<Student,String> linkedHashMap=new LinkedHashMap<>();
        Student student = new Student(001,"张三",88);
        Student student1 = new Student(002,"光头强",60);
        Student student2 = new Student(001,"李四",78);
       linkedHashMap.put(student,"森林");
       linkedHashMap.put(student1,"森林");
       linkedHashMap.put(student2,"森林");
        //键找值
        Set<Student> set = linkedHashMap.keySet();
        for (Student key : set) {
            String value = linkedHashMap.get(key);
            System.out.println(key+value);
        }


    }
}
